<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Encabezado Interno</title>
<link href="Style.css" rel="stylesheet" type="text/css" />
</head>

<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="40" bgcolor="#FFCC00" class="LineaSimpleDoble">
    
    <div align="center">
      <table width="1000" border="0" cellspacing="0" cellpadding="0" >
        <tr>
          <td width="511" align="left"><?
		//  echo $user_agent;
          //incluyo la conexion a la base de datos.
		 include("conexion.php");

// EJEMPLO DE CONSULTA DE SELECCIÓN DE REGISTROS. PREPARADA
$db = conectaDb();
$dbTabla = $dbDb . ".actualizacion";                  // Nombre de la tabla
$consulta = "SELECT FECHA,HORA FROM $dbTabla WHERE ID > :id ORDER BY ID DESC LIMIT 1";
  try {
$result = $db->prepare($consulta,array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));
$result->execute(array(":id" => 1));
if (!$result) {
    print "<p>Error en la consulta.</p>\n";
} else {
   
    $array   = $result->fetch(PDO::FETCH_ASSOC);
	
	$fecha = $array['FECHA'];
	$hora = $array['HORA'];
    
	
}
  } catch (PDOException $e) {
    print $e->getMessage();
  }
$db = null;
//FIN CONSULTA
		  $actualizado = $fecha. " a las ".$hora;
		  
		  ?><span class='LetraPequeniaDoble'>Actualizado: </span><span class='LetraPequenia'><? echo $actualizado; ?> </span><span class="LetraPequeniaDoble">|</span><span class='LetraPequenia'> <span class="LetraPequeniaDoble">
        <? 
	  	$fecha = time();
		$dia = date ("w" , $fecha);
		switch ($dia){
			case "0": 	
				$dia = "Domingo";
				break;
			case "1": 	
				$dia = "Lunes";
				break;
			case "2": 	
				$dia = "Martes";
				break;
			case "3": 	
				$dia = "Miércoles";
				break;
			case "4": 	
				$dia = "Jueves";
				break;
			case "5": 	
				$dia = "Viernes";
				break;
			case "6": 	
				$dia = "Sábado";
				break;			
		}
		$mes = date( "F" , $fecha );
		switch($mes){
			case "January";
				$mes = "Enero";
				break;
			case "February";
				$mes = "Febrero";
				break;
			case "March";
				$mes = "Marzo";
				break;
			case "April";
				$mes = "Abril";
				break;
			case "May";
				$mes = "Mayo";
				break;
			case "June";
				$mes = "Junio";
				break;
			case "July";
				$mes = "Julio";
				break;
			case "August";
				$mes = "Agosto";
				break;
			case "September";
				$mes = "Septiembre";
				break;
			case "October";
				$mes = "Octubre";
				break;
			case "November";
				$mes = "Noviembre";
				break;
			case "December": 	
				$mes = "Diciembre";
				break;	
		}
		echo $dia."&nbsp;";
		echo date ( " j " , $fecha );
		echo "de ";
		echo $mes;
		echo " de ";
		echo date("Y" , $fecha ); 
		//browser para detectar si ingresa desde el explorer o desde otro explorador.
		$browser = substr($_SERVER['HTTP_USER_AGENT'],8,1);
	?>
          |</span></span></td>
          <td width="369"> <!-- B&uacute;squeda Google -->
              <div align="right">
                <form action="http://www.google.com.ar/cse" id="cse-search-box">
                  <div>
                    <input type="hidden" name="cx" value="partner-pub-9550488638935635:9068885752" />
                    <input type="hidden" name="ie" value="UTF-8" />
                    <input type="text" name="q" size="30" />
                    <input type="submit" name="sa" value="Buscar" />
                  </div>
                </form>
                <script type="text/javascript" src="http://www.google.com.ar/coop/cse/brand?form=cse-search-box&amp;lang=es"></script>
            </div>
            <!-- B&uacute;squeda Google --></td>
          <td width="9">&nbsp;</td>
          <td width="111"><div align="right">
            <table width="98%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="24%"><div align="right"><a href="https://www.facebook.com/EstasEnPosse" target="_blank"><img src="IMAGENES/icon_face_BN.png" width="25" height="25" border="0" onmouseover="this.src='IMAGENES/icon_face.png';" onmouseout="this.src='IMAGENES/icon_face_BN.png';"/></a></div></td>
                <td width="7%">&nbsp;</td>
                <td width="23%"><a href="https://twitter.com/EstasEnPosse" target="_blank"><img src="IMAGENES/icon_twitter_BN.png" width="25" height="25" border="0" onmouseover="this.src='IMAGENES/icon_twitter.png';" onmouseout="this.src='IMAGENES/icon_twitter_BN.png';"/></a></td>
                <td width="10%">&nbsp;</td>
                <td width="21%" align="left"><a href="http://www.youtube.com/user/estasenposse" target="_blank"><img src="IMAGENES/icon_youtube_BN.png" width="25" height="25" border="0" onmouseover="this.src='IMAGENES/icon_youtube.png';" onmouseout="this.src='IMAGENES/icon_youtube_BN.png';"/></a></td>
                <td width="15%"><!-- Place this tag where you want the +1 button to render. -->
<div class="g-plusone" data-annotation="none"></div>

<!-- Place this tag after the last +1 button tag. -->
<script type="text/javascript">
  window.___gcfg = {lang: 'es-419'};

  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script></td>
              </tr>
            </table>
          </div></td>
          </tr>
      </table>
    </div>
    
    </td>
  </tr>
  <tr>
    <td height="185" class=""><table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="185"><a href="http://www.estasenposse.com/" target="_parent"><img src="IMAGENES/LogoMasterMundial.png" alt="Logo" width="450" height="215" border="0" /></a></td>
        <td width="57%" valign="middle"><iframe src="http://www.estasenposse.com/publicidadInternaHorizontal.php" name="nombre" height="60"  width="563" scrolling="no" frameborder="0"></iframe></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>